/**
 * Project: Utilities <br>
 * Package: org.leumasjaffe.dice
 */
package org.leumasjaffe.dice;

import org.eclipse.jdt.annotation.NonNullByDefault;

/**
 * Class .AbsRoller in file AbsRoller.java <br>
 * 
 * @author leumasjaffe
 * @version Jan 22, 2013
 * Created on: Jan 22, 2013
 * 
 */
@NonNullByDefault
abstract class AbsRoller implements Roll {
	
	/* (non-Javadoc)
	 * @see tools.dice.Roll#rollset(int)
	 */
	@Override
	public int[] rollset(int numRolls) {
		return rollset(numRolls, 0);
	}

	/* (non-Javadoc)
	 * @see tools.dice.Roll#rollset(int, int)
	 */
	@Override
	public int[] rollset(int numRolls, int bonus) {
		final int[] rolls = new int[numRolls];
		for (int i = 0; i < numRolls; i++) {
			rolls[i] = roll(bonus);
		}
		return rolls;
	}

}
